package com.unswift.core.entity;

import java.util.List;

import com.unswift.annotation.api.ApiConstructor;
import com.unswift.annotation.api.ApiEntity;
import com.unswift.annotation.api.ApiField;
import com.unswift.exception.CoreException;

import lombok.Data;

@Data
@ApiEntity(value="系统消息实体类", author="unswift", date="2022-12-16", version="1.0.0")
public class Message {

	@ApiField("消息键")
	private String key;
	
	@ApiField("消息编码")
	private String code;
	
	@ApiField("消息语言")
	private String language;
	
	@ApiField("消息")
	private String message;
	
	@ApiField("异常类类型")
	private Class<? extends CoreException> exception;
	
	@ApiField("异常消息参数的排序")
	private List<Integer> argsOrder;
	
	@ApiConstructor("系统消息实体默认构造")
	public Message() {
		
	}
	@ApiConstructor(value="系统消息实体带参构造", params={@ApiField("消息键"), @ApiField("消息编码"), @ApiField("消息语言"), @ApiField("消息"), @ApiField("异常类类型"), @ApiField("异常消息参数的排序")})
	public Message(String key, String code, String language, String message, Class<? extends CoreException> exception,
			List<Integer> argsOrder) {
		super();
		this.key = key;
		this.code = code;
		this.language = language;
		this.message = message;
		this.exception = exception;
		this.argsOrder = argsOrder;
	}
	
}
